package com.example.backend.entitly.mysql.permission;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 操作日志表
 *
 * @TableName operation_logs
 */
@TableName(value = "operation_logs")
@Data
public class OperationLogs implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 日志ID
     */
    @TableId(type = IdType.AUTO)
    private Integer logId;
    /**
     * 操作用户ID
     */
    private Integer userId;
    /**
     * 操作类型(如: 新增/删除/修改)
     */
    private String operationType;
    /**
     * 操作对象类型(如: 用户/订单)
     */
    private String targetType;
    /**
     * 操作对象ID
     */
    private Integer targetId;
    /**
     * 操作详情
     */
    private String operationDetail;
    /**
     * 操作IP
     */
    private String ipAddress;
    /**
     * 用户代理
     */
    private String userAgent;
    /**
     * 操作时间
     */
    private Date createdAt;
}